import http from "@/api/http";

export function getList() {
  return http.get({
    url: "/system/role/list"
  });
}

export function getPage(query: any) {
  return http.get({
    url: "/system/role/page",
    params: query
  });
}

export function getRole(id: number) {
  return http.get({
    url: "/system/role/" + id
  });
}

export function saveRole(obj: object) {
  return http.post({
    url: "/system/role",
    data: obj
  });
}

export function updateRole(obj: object) {
  return http.put({
    url: "/system/role",
    data: obj
  });
}

export function delRole(id: any) {
  return http.delete({
    url: "/system/role/" + id
  });
}

export function updateRoleMenu(obj: object) {
  return http.put({
    url: "/system/role/menu",
    data: obj
  });
}
